﻿@model Hetang.Models.DataContext.tbl_Job
@using Hetang.Areas.User.Models.DataType
@using Hetang.Models.Interface
@using Hetang.Models.Repository
@using Hetang.Models.Helper
@{
    ViewBag.Title = Model.JobName + " - " + Model.tbl_Company.Name;

    IConfigRepository _cr = new ConfigRepository();
}

<div class="container container-bg top80 padding-lr-clear">
    <div class="row">
        <div class="span12" style="position:relative">
            <h1 class="title-website-name">@_cr.GetWebsiteName()</h1>
            <div class="top20 padding-lr10">
                <h2 class="t-blue">@Model.tbl_Company.Name</h2>
            </div>
        </div>
    </div>
    <div class="row" style="position:relative;z-index:999;">
        <div class="span12 top20 header padding-t10 padding-lr10" style="background-color: #f5f5f5">
            @{                
                List<SelectListItem> Trade = _cr.GetCompanyTrade();
                foreach(var t in Trade)
                {
                    if(t.Value.Equals(Model.tbl_Company.Trade))
                    {
                        <p>所属行业：@t.Text</p>
                        break;
                    }
                }
            }
            <p>企业性质：@Model.tbl_Company.Unit_character</p>
        </div>
    </div>
    <div class="row">
        <div class="span12">
            <div class="top20 padding-lr10">
                <h3 class="text-error">@Model.JobName<small class="muted">（职位编号：@Model.Id）</small></h3>
            </div>
            <div class="row">
                <div class="span12 padding-lr10">
                    <div class="span3">招聘人数：@Model.Many 人</div>
                    <div class="span3">职位月薪：@Model.Salary</div>
                    <div class="span3">工作性质：@Model.PostitonType</div>
                    <div class="span3">性别：@Model.Sex</div>
                    <div class="span3 padding-t10">年龄：@Model.Age 岁以上</div>
                    <div class="span3 padding-t10">英语水平：@Model.English</div>
                    <div class="span3 padding-t10">学历要求：@Model.Learn</div>
                    <div class="span3 padding-t10">经验：@Model.Experiences</div>
                    <div class="span3 padding-t10">招聘有效期至：@Model.ValidDate.ToString("yyyy年MM月dd日")</div>
                    @if(!string.IsNullOrEmpty(Model.WorkPlace))
                    {
                        <div class="span9 padding-t10">工作地点：@Model.WorkPlace</div>
                    }
                </div>
            </div>
            <div class="row">
                <div class="span12 padding-lr10 top20">
                    <h4>职位要求</h4>
                    <div class="article-content">
                        @Model.OtherDemand
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="span12 padding-lr10 top20">
                    <h4>联系方式</h4>
                    <div class="article-content">
                        <table class="contacts-list">
                            <tr><td><i class="icon-user"></i> 联系人：</td><td>@Model.Contacts</td></tr>
                            <tr><td><i class="icon-signal"></i> 联系电话：</td><td>@Model.Phone</td></tr>
                            <tr><td><i class="icon-print"></i> 传真：</td><td>@(string.IsNullOrEmpty(Model.Fax) ? "没有提供" :  Model.Fax)</td></tr>
                            <tr><td><i class="icon-globe"></i> QQ：</td><td>@(string.IsNullOrEmpty(Model.QQ) ? "没有提供" :  Model.QQ)</td></tr>
                            <tr><td><i class="icon-envelope"></i> 电子邮箱：</td><td>@Model.tbl_Company.Email</td></tr>
                            <tr><td><i class="icon-road"></i> 联系地址：</td><td>@Model.Address</td></tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row top20" style="border-top: 1px solid #dedede">
        <div class="span12 padding-lr10">
            <h4><i class="icon-list" style="vertical-align: baseline"></i> 该企业其它招聘职位</h4>
            <div class="bottom20">
                <ul class="unstyled inline clearfix">
                    @{
                        string recruit = Model.tbl_Company.Recruit;
                        if(!string.IsNullOrEmpty(recruit))
                        {
                            List<dt_Recruit> recruitList = Hetang.Models.Helper.JsonHelper.parse<List<dt_Recruit>>(Model.tbl_Company.Recruit);
                            if(recruitList.Count > 1)
                            {
                                foreach (var r in recruitList)
                                {
                                    if(!r.id.Equals(Model.Id))
                                    {
                                        <li class="span1">@Html.ActionLink(r.name, "view", "job", new { id = r.id, area = "" }, new { title = "查看 " + r.name + " 这个职位" })</li>
                                    }
                                }
                            }
                            else
                            {
                                <li><h3 class="muted">该企业还没有发布其它招聘信息！</h3></li>
                            }
                        }
                    }                    
                </ul>
            </div>
        </div>
    </div>
</div>
